package com.taplinker.client;

import java.util.HashMap;

import android.app.Application;
import android.content.Context;

import com.taplinker.client.core.ImageManager;
import com.taplinker.client.domain.UserInfo;
import com.ti.winona.bean.User;

public class AppConfigFactory {
	
	private Application application;
	private UserInfo userInfo;
	private User user;
	private String appKey;
	private String appName;
	private String webDisk;
	private HashMap<String, String> permissonsMap;
	private static AppConfigFactory instance;

	private AppConfigFactory() {
	}

	public static AppConfigFactory getInstance() {
		if (instance != null)
			return instance;
		synchronized (AppConfigFactory.class) {
			if (instance == null) {
				instance = new AppConfigFactory();
			}
		}
		return instance;
	}

	public void initAppConfig(Context context) {
		ImageManager.getInstance().initialize(context);
	}

	public void initAppConfig(Context context, Application application) {
		ImageManager.getInstance().initialize(context);
		this.application = application;
	}

	public Application getApplication() {
		return application;
	}

	public void setApplication(Application application) {
		this.application = application;
	}

//	private Expert expert;
//	public Expert getExpert() {
//		return expert;
//	}
//
//	public void setExpert(Expert expert) {
//		this.expert = expert;
//	}

	public UserInfo getUserInfo() {
		return userInfo;
	}

	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}
	
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getAppKey() {
		return appKey;
	}

	public void setAppKey(String appKey) {
		this.appKey = appKey;
	}

	public String getAppName() {
		return appName;
	}

	public void setAppName(String appName) {
		this.appName = appName;
	}

	public String getWebDisk() {
		return webDisk;
	}

	public void setWebDisk(String webDisk) {
		this.webDisk = webDisk;
	}

	public HashMap<String, String> getPermissonsMap() {
		return permissonsMap;
	}

	public void setPermissonsMap(HashMap<String, String> permissonsMap) {
		this.permissonsMap = permissonsMap;
	}

}
